<% include header.ejs %>
	<link rel="stylesheet" type="text/css" href="/plugins/sinaEmotion/jquery.sinaEmotion.css">
	<link rel="stylesheet" href="/css/index.css">
	<script src="/plugins/sinaEmotion/jquery.sinaEmotion.js" type="text/javascript"></script>
	<script src="/js/detail.js" type="text/javascript"></script>
    <!-- 正文部分 -->
	<section class="content-main">
		<div class="container result-list">
			<div class="row">
				<div class="col-md-8">
					<!-- 文章详情部分 -->
                    <div class="detail-main panel">
						<h1 class="detail-tit">
                        	<%= data.title %>
						</h1>
						<div class="detail-info">
							<span class="user"><i class="glyphicon glyphicon-user"></i><a href="#"> <%= data.userName %></a></span>
							<span class="time"><i class="glyphicon glyphicon-calendar"></i><%= data.createTime %></span>
							<span class="type"><i class="glyphicon glyphicon-tasks"></i><a href="#"> <%= data.typeName %></a></span>
						</div>
						<div class="detail-txts">
                            <%- data.content %>
                        </div>
						<div class="prev-next">
							<div class="prev"><span>上一篇:</span><% if(last.length > 0) {%><a href="/detail/<%= last[0].postId%>"><%= last[0].title%></a><% } else { %> 没有更多了 <% } %></div>
							<div class="next"><span>下一篇:</span><% if(next.length > 0) {%><a href="/detail/<%= next[0].postId%>"><%= next[0].title%></a><% } else { %> 没有更多了 <% } %></div>
						</div>
						<div class="box">
							<div class="col-btn">
								<a class="like <% if(like) { %>active<% } %>" href="javascript:void(0)"><i class="fa fa-heart-o"></i>点赞</a>
							</div>
						</div>
                    </div>
					<div class="comment-main panel">
						<form class="comment">
							<div class="comment_body">
								<textarea class="content" id="content" data-postId="<%= postId %>"></textarea>
								<div class="btns">
									<i class="face-show fa fa-smile-o"></i>
									<input class="btn btn-primary btn-submit" type="button" id="comment-btn" value="评论">
									<div class="clearfix"></div>
								</div>
							</div>
						</form>
						<div class="comment-list">
							<div class="comment-tit">
								<div class="row">
									<div class="col-md-6">所有评论</div>
									<div class="col-md-6 total">总共<span class="total-comment"></span>条评论</div>
								</div>
							</div>
							<div class="cm-list">
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-4">
					<% include pubRight.ejs %>
				</div>
			</div>
		</div>
	</section>
<% include footer.ejs %>